// const {getHotHttp,getNewHttp,getHostHttp} = require("../../models/http")
const {hotMusic,newMusic,dj} = require("../../models/home")
const {titles,icons} = require("../../static/data")
Page({
  data:{
    music:""
  },
  onLoad:async function(){
    let https = [hotMusic,newMusic,dj]
    let music = {}
    for(let item of https){
      let res = await item()
      music[item.name]={
        title:titles[item.name],
        imgurl:icons[item.name],
        playlists:res.data.playlists.slice(0,3)
      }
    }
    this.setData({
      music
    })
  }
})
